package cn.crex1.xiaomi.dao;

import java.util.List;

import cn.crex1.xiaomi.core.orm.annotion.Query;
import cn.crex1.xiaomi.core.orm.annotion.ResultType;
import cn.crex1.xiaomi.vo.ProductVO;

public interface CategorySDao {
	//分类查询小米手机
	//select 字段1，字段2。。 from 表1 left join 表2 on 表1.字段 = 表2.字段
	//SELECT Sname,Teacher from student LEFT JOIN score on student.Sid = score.Sid LEFT JOIN course on score.Cid = course.Cid where Sname like '张%';
	@Query(sql="select os_product.product_number,os_product.name,os_product.show_price,os_product.introduce,os_product.pic_img from"
			+ " os_category left join os_product_category on os_category.category_id=os_product_category.category_id "
			+ "left join os_product on os_product_category.product_id=os_product.product_id where  os_category.category_id=?")
	@ResultType(value="List")//定义返回值
	List<ProductVO> selectOProductByOCategoryName(ProductVO oProductVO);
	
	
}
